package com.sbtr.business.material.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sbtr.business.material.entity.MaterialInfo;
import com.sbtr.common.PageDto;
import com.sbtr.open.material.dto.MaterialInfoDto;
import com.sbtr.open.material.dto.MaterialInfoSearchDto;
import com.sbtr.overview.dto.AllCountDto;
import com.sbtr.overview.dto.MaterialSetTypeCountDto;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 素材集名称 服务类
 * </p>
 *
 * @author zengjw5

 */
public interface IMaterialInfoService extends IService<MaterialInfo> {

	 PageDto<MaterialInfoDto> search(MaterialInfoSearchDto dto);


	 MaterialInfoDto findByProjectId(Long projectId);

	 List<String> getMaterialType();

	 boolean batchDeleteById(List<Long> idList);

	 MaterialInfoDto findById(Long id);

	 boolean deleteById(Long id);

	List<MaterialSetTypeCountDto> materialSetTypeCount(String creater);

	PageDto<MaterialInfoDto> search(Long materialSetId, Long currPage,Long pageSize);

//	@RequestMapping(value = "search", method = RequestMethod.GET)
//	 PageDto<MaterialInfoDto> search(
//            @RequestParam("materialSetId") Long materialSetId
//            , @RequestParam("page") Long currPage, @RequestParam("pageSize") Long pageSize
//
//    );

//	@RequestMapping(value = "deleteFile", method = RequestMethod.GET)
//	 boolean deleteFile(@RequestParam("fileId") Long fileId);


	 MaterialInfoDto savePojectId(MaterialInfoDto dto);

	 MaterialInfoDto save(MaterialInfoDto dto);

	 boolean batchSave(List<MaterialInfoDto> dtos);

//	@RequestMapping(value = "/batchDelete", method = RequestMethod.POST)
//	 boolean batchDelete(@RequestBody List<Long> idList);

	 List<MaterialInfoDto> searchByIds(List<Long> idList);

	AllCountDto materialCount(String creater);
}
